<?php
	#-------------------------------------------------------------#
	# This file is part of the Kumomado - Virtual Window Platform #
	# for PHP. (c) 2009 Tsai, Min Che <tirme0812@gmail.com>       #
	# Please visit http://www.kumomado.org/ for more information. #
	#                                                             #
	# This software is licensed under the GNU License v3. Please  #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#

	Kumomado::load('Kui.Containers.Frame.KumomadoFrame');
	Kumomado::load('Kui.Containers.Window.KumomadoWindow');
	Kumomado::load('Kui.Containers.Layouts.Form.KumomadoForm');
	Kumomado::load('Kui.Components.Base.KumomadoButton');
	Kumomado::load('Kui.Components.Base.KumomadoTextBox');
	Kumomado::load('Kui.Components.Base.KumomadoTextArea');
	Kumomado::load('Kui.Components.Base.KumomadoCheckBox');
	Kumomado::load('Kui.Components.Base.KumomadoRadio');
	Kumomado::load('Kui.Components.Base.KumomadoSelect');
	Kumomado::load('Kui.Components.Base.KumomadoHidden');
	Kumomado::load('Kui.Components.DataGrid.KumomadoDataGrid');
	
	/**
	 * @package libraries/kui/
	 * @author Tsai, Min Che
	 * @version 1.0
	 */
	class KumomadoUIClient {
		protected $kuis = array();
		private function __construct() {}
		public static function getInstance() {
			static $object = NULL;
			if ($object === NULL) {
				$object = new KumomadoUIClient();
			}
			return $object;
		}
		public function register($id, $attrs) {
			$this->kuis[$id] = $attrs;
		}
		public function render() {
			$this->kuis = array_reverse($this->kuis);
			return $this->kuis;
		}
		private function __clone() {}
	}
?>